#!/usr/bin
# -*- coding: utf-8 -*-

import mod_parameters as params
import mod_parser as par

# ==============================================================================
class Problem():
    def __init__(self, inputFileName):
        self.inputFileName = inputFileName
        self.parser = self.setParser()

        self.domain = None
        self.analysis = None
        self.stepManager = None

    def setParser(self):
        ext = self.inputFileName[-3:]
        return par.buildParser(ext)

    def parseInputFile(self):
        self.parser.readFile(self.inputFileName)

    def buildCodeDataStructure(self):
        self.parser.buildCodeDataStructure(self)
